package com.znjc.iot.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

/**
 * 校验对象 iot_data_check
 *
 * @author zengpc
 * @date 2023-12-04
 */
@Data
public class IotDataCheck extends BaseZnjcEntity {
    private static final long serialVersionUID = 1L;


    /**
     * 校验名
     */
    private String checkName;
    /**
     * 命令
     */
    private String command;

    /**
     * 开始获取位置
     */
    private Integer acquireStartLen;

    /**
     * 数据分割位数
     */
    private Integer dataSliptNum;

    /**
     * 是否存在此串口标识 默认不存在
     */
    @TableField(exist = false)
    private boolean flag = false;

    public boolean isAdmin() {
        return isAdmin(this.getId());
    }

    public static boolean isAdmin(Long id) {
        return id != null && 1L == id;
    }


}
